package com.cust.cow.service.impl;

import com.cust.cow.common.Result;
import com.cust.cow.mapper.BreedMapper;
import com.cust.cow.pojo.breed;
import com.cust.cow.service.BreedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BreedServiceImpl implements BreedService {
    @Autowired
    public BreedMapper breedMapper;
    @Override
    public List<breed> findBreedAll() {
        return breedMapper.findBreedAll();
    }

    @Override
    public Result insertBreed(breed breed) {
        breedMapper.insertBreed(breed);
        return new Result(200, "插入成功");
    }

    @Override
    public Result deleteBreed(String breedName) {
        breedMapper.deleteBreed(breedName);
        return new Result(200, "删除成功");
    }
}
